<?php
$this->breadcrumbs=array(
	'Posters',
);
?>
<h1>广告管理</h1>
<span ><a href="?r=poster/admin">我的广告</a></span>
<span ><a href="?r=poster/create">新增广告</a></span></br>
<? $this->breadcrumbs=array(
	'Posters'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List Poster', 'url'=>array('index')),
	array('label'=>'Create Poster', 'url'=>array('create')),
);
Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$.fn.yiiGridView.update('poster-grid', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<?php echo CHtml::link('高级搜索','#',array('class'=>'search-button')); ?>
<div class="search-form" style="display:none">
<?php $this->renderPartial('_search',array(
	'model'=>$model,
)); ?>
</div><!-- search-form -->

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'poster-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		//'ID',
		//'UID',
		'Title',
		'Url',
		'Size',
		'Position',
		'Filename',
		'Click',
		array(
			'class'=>'CButtonColumn',
			'viewButtonOptions'=>array('target'=>'_blank'), 
		),
	),
)); ?>